<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<title></title>
		<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vant@2.5/lib/index.css">
		<link rel="stylesheet" href="../css/global.css">
		<link rel="stylesheet" href="../css/me.css">
		<script src="../js/flexble.js"></script>
		<script src="https://cdn.jsdelivr.net/npm/vue@2.6.11"></script>
		<script src="https://cdn.jsdelivr.net/npm/vant@2.5/lib/vant.min.js"></script>
		<script type="text/javascript" src="../sdk/webimSDK3.1.2.js"></script>
		<script type="text/javascript" src="../js/WebIMConfig.js"></script>
		<script type="text/javascript" src="../js/webconn.js"></script>
		<script type="text/javascript" src="../js/localstorage.js"></script>
		<script type="text/javascript" src="../utils/login.js"></script>
	</head>
	<body>
		<div id="bigbox" class="friendDetailBox">
			<!-- <div class="fixedtop">
				<div class="getBack">
					<van-button class="arrowbox" type="default" @click="back">
						<img src="../img/back.png">
					</van-button>
					<p style="line-height: 1rem;font-size: .4rem;">提交订单成功</p>
					<div class="dingdan">
						<img class="oicon1" src="../img/oicon1.png">
					</div>
				</div>
			</div> -->
			<div class="detailbox">
				<img class="avatar" src="../img/avatar.jpg" >
				<p class="name">{{myname}}</p>
			</div>
			<van-button class="sendmsg" type="default">
				<div class="sendmsg_leftbox">
					<div class="meimgbox">
						<img class="detailsend" src="../img/meicon1.png">
					</div>
					<span>修改密码</span>
				</div>
				<img class="more" src="../img/more.png">
			</van-button>
			<van-button class="sendmsgout" type="default" @click="logout">
				<div class="sendmsg_leftbox">
					<span style="text-align: center;">退出</span>
				</div>
			</van-button>
			
			<div class="footerbox">
				<div class="footinner" @click="gourl('chatlist.html')">
					<van-tag v-if="allnoreadnumshow>0" class="foot_noreadbox" round type="danger">{{allnoreadnumshow}}</van-tag>
					<img class="left_icon1" src="../img/left_icon1.png">
					<p>聊天</p>
				</div>
				<div class="footinner" @click="gourl('addressbook.html')">
					<van-tag v-if="newfriendnum>0" class="foot_noreadbox" round type="danger">{{newfriendnum}}</van-tag>
					<img class="left_icon3" src="../img/left_icon3.png">
					<p>通讯录</p>
				</div>
				<div class="footinner">
					<img class="left_icon4" src="../img/left_icon_ac4.png">
					<p class="footcurrent">我</p>
				</div>
			</div>
		</div>
	</body>
</html>
<script type="text/javascript">
WebIM.message = WebIM.default.message;
var webvue = new Vue({
	el: '#bigbox',
	data() {
		return {
			myname:'',
			allnoreadnumshow:0,
			newfriendnum:0
		}
	},
	mounted(){
		isfirst = 7;
		relogin()
		this.myname = getStorage('myid');
		this.allnoreadnumshow = getStorage('allnoreadnumshow');
		this.newfriendnum = getStorage('newfriendnum');
	},
	methods:{
		back(){
			window.history.go(-1);
		},
		gourl(url){
			window.location.href = url;
		},
		logout(){
			vant.Dialog.confirm({
				title: '提示',
				message: '您要退出账号吗？',
			})
			.then(() => {
				// on confirm
				conn.close();
			})
			.catch(() => {
				// on cancel
			});
		}
	}
})
</script>